package com.swanclouds.redfish.chassis.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.swanclouds.redfish.common.redfish.Status;

import java.util.List;
import java.util.Map;


public class PowerSupplies {

    /**指定电源模块的访问路径**/
    @JsonProperty("@odata.id")
    private String dataId;

    /**指定电源模块的ID**/
    @JsonProperty("MemberId")
    private String memberId;

    /**指定电源模块的名称**/
    @JsonProperty("Name")
    private String name;

    /**指定电源模块的状态
     * 指定电源模块的状态，包
     * 括：
     * ● State：电源模块是否
     * 使能
     * ● Health：电源模块健康
     * 状态
     * ● Severity：电源模块的
     * 自定义健康状态**/
    @JsonProperty("Status")
    private Status status;

    /**指定电源模块的供电类型
     ● Unknown
     ● AC
     ● DC
     ● ACorDC*/
    @JsonProperty("PowerSupplyType")
    private String powerSupplyType;

    /**指定电源模块的输入电压**/
    @JsonProperty("LineInputVoltage")
    private String lineInputVoltage;

    /**指定电源模块的额定功率**/
    @JsonProperty("PowerCapacityWatts")
    private String powerCapacityWatts;

    /**指定电源模块的型号**/
    @JsonProperty("Model")
    private String model;

    /**指定电源模块的固件版本**/
    @JsonProperty("FirmwareVersion")
    private String firmwareVersion;

    /**指定电源模块的序列号**/
    @JsonProperty("SerialNumber")
    private String serialNumber;

    /**指定电源模块制造商**/
    @JsonProperty("Manufacturer")
    private String manufacturer;

    /**指定电源模块实际所属的
     电源冗余组列表，包括：
     ● @odata.id：指定电源
     冗余组的访问路径**/
    @JsonProperty("Redundancy")
    private List<Map<String, Object>> redundancy;

    /**指定电源模块的部件号**/
    @JsonProperty("PartNumber")
    private String partNumber;

    /**电源模块自定义信息**/
    @JsonProperty("Oem")
    private Map<String, Object> oem;

    public String getDataId() {
        return dataId;
    }

    public String getMemberId() {
        return memberId;
    }

    public String getName() {
        return name;
    }

    public Status getStatus() {
        return status;
    }

    public String getPowerSupplyType() {
        return powerSupplyType;
    }

    public String getLineInputVoltage() {
        return lineInputVoltage;
    }

    public String getPowerCapacityWatts() {
        return powerCapacityWatts;
    }

    public String getModel() {
        return model;
    }

    public String getFirmwareVersion() {
        return firmwareVersion;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public String getManufacturer() {
        return manufacturer;
    }

    public List<Map<String, Object>> getRedundancy() {
        return redundancy;
    }

    public String getPartNumber() {
        return partNumber;
    }

    public Map<String, Object> getOem() {
        return oem;
    }

    @Override
    public String toString() {
        ObjectMapper objectMapper = new ObjectMapper();
        try {
            return objectMapper.writeValueAsString(this);
        } catch (JsonProcessingException e) {
        }
        return "PowerSupplies{" +
                "@odata.id='" + dataId + '\'' +
                "Name='" + name + '\'' +
                "MemberId='" + memberId + '\'' +
                "Status='" + status + '\'' +
                "PowerSupplyType='" + powerSupplyType + '\'' +
                "Model='" + model + '\'' +
                "LineInputVoltage='" + lineInputVoltage + '\'' +
                "PowerCapacityWatts='" + powerCapacityWatts + '\'' +
                "FirmwareVersion='" + firmwareVersion + '\'' +
                "SerialNumber='" + serialNumber + '\'' +
                "Manufacturer='" + manufacturer + '\'' +
                "PartNumber='" + partNumber + '\'' +
                "Redundancy='" + redundancy + '\'' +
                "Oem='" + oem + '\'' +
                '}';
    }

}
